package org.jeecg.modules;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.config.swagger.BusinessApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "示例接口")
@BusinessApi  //需要加这个才能显示在swagger文档里，建议直接复制这一坨
@RestController
@RequestMapping("/demo")   //新建的路由记得在yml中配置跳过shiro校验
@Slf4j
public class DemoController {

    @ApiOperation(value = "Hello World", notes = "" +
            "<nbsp> ╭━╮<nbsp> ╭┳━━━┳━╮╭━┳━━━╮<nbsp> <nbsp> ╭━━━╮<nbsp> <nbsp> ╭╮<nbsp> <nbsp> <nbsp>  <br/>" +
            "<nbsp> ┃┃╰╮┃┃╭━╮┃┃╰╯┃┃╭━━╯<nbsp> <nbsp> ┃╭━╮┃<nbsp> ╭╯╰╮<nbsp> <nbsp> <nbsp> <br/>" +
            "<nbsp> ┃╭╮╰╯┃┃<nbsp> ╰┫╭╮╭╮┃╰━━╮<nbsp> <nbsp> ┃┃<nbsp> ┃┣╮┣╮╭╋━━╮<br/>" +
            "<nbsp> ┃┃╰╮┃┃┃<nbsp> ╭┫┃┃┃┃┃╭━━╯<nbsp> <nbsp> ┃╰━╯┃┃┃┃┃┃╭╮┃<br/>" +
            "<nbsp> ┃┃<nbsp> ┃┃┃╰━╯┃┃┃┃┃┃╰━━╮╭╮┃╭━╮┃╰╯┃╰┫╰╯┃<br/>" +
            "<nbsp> ╰╯<nbsp> ╰━┻━━━┻╯╰╯╰┻━━━╯╰╯╰╯<nbsp> ╰┻━━┻━┻━━╯<br/>")
    @GetMapping(value = "/demo")
    public Object demo(@RequestParam(value = "coder", defaultValue = "Someone") String coder) {
        return coder + " say \"Hello World\"";
    }

}
